package com.itcast.demoone.kotlin

fun  main() {
    // letDemo()
}

fun letDemo(){
    var name: String? = null
    name = "lisi"
    name?.let {
        // 只有非空时才会执行
        println("${it.toUpperCase()},欢迎来到Kotlin")
    }

    /*var gender: String? = null
    gender.let {
        print("性别:$it")
    }*/
}